package ro.ubbcluj.cs.damate.persistence.repository;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import ro.ubbcluj.cs.damate.persistence.entities.Role;

import java.util.List;

/**
 * @author Lóránd Fazakas (lorand)
 *         Date: 5/10/12
 *         Time: 9:25 PM
 */
public interface RoleRepository extends CrudRepository<Role, Long> {

    @Query("select e from Role e ")
    List<Role> findAll();

    List<Role> findByRoleName(String roleName);
}
